/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.evl.tecinfo.gui;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author Tecinfo
 */
@Entity
@Table(name = "registrohoraextra", catalog = "registrohoraextra", schema = "")
@NamedQueries({
    @NamedQuery(name = "Registrohoraextra.findAll", query = "SELECT r FROM Registrohoraextra r"),
    @NamedQuery(name = "Registrohoraextra.findByAticomplementar", query = "SELECT r FROM Registrohoraextra r WHERE r.aticomplementar = :aticomplementar"),
    @NamedQuery(name = "Registrohoraextra.findByMes", query = "SELECT r FROM Registrohoraextra r WHERE r.registrohoraextraPK.mes = :mes"),
    @NamedQuery(name = "Registrohoraextra.findByQuantidadehoras", query = "SELECT r FROM Registrohoraextra r WHERE r.quantidadehoras = :quantidadehoras"),
    @NamedQuery(name = "Registrohoraextra.findByAno", query = "SELECT r FROM Registrohoraextra r WHERE r.registrohoraextraPK.ano = :ano"),
    @NamedQuery(name = "Registrohoraextra.findByBhmes", query = "SELECT r FROM Registrohoraextra r WHERE r.bhmes = :bhmes"),
    @NamedQuery(name = "Registrohoraextra.findByOutros", query = "SELECT r FROM Registrohoraextra r WHERE r.outros = :outros"),
    @NamedQuery(name = "Registrohoraextra.findByTotal", query = "SELECT r FROM Registrohoraextra r WHERE r.total = :total"),
    @NamedQuery(name = "Registrohoraextra.findByCodCPF", query = "SELECT r FROM Registrohoraextra r WHERE r.registrohoraextraPK.codCPF = :codCPF")})
public class Registrohoraextra implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected RegistrohoraextraPK registrohoraextraPK;
    @Column(name = "ATICOMPLEMENTAR")
    private String aticomplementar;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "QUANTIDADEHORAS")
    private Double quantidadehoras;
    @Column(name = "BHMES")
    private Double bhmes;
    @Column(name = "OUTROS")
    private Double outros;
    @Column(name = "TOTAL")
    private Double total;

    public Registrohoraextra() {
    }

    public Registrohoraextra(RegistrohoraextraPK registrohoraextraPK) {
        this.registrohoraextraPK = registrohoraextraPK;
    }

    public Registrohoraextra(int mes, int ano, String codCPF) {
        this.registrohoraextraPK = new RegistrohoraextraPK(mes, ano, codCPF);
    }

    public RegistrohoraextraPK getRegistrohoraextraPK() {
        return registrohoraextraPK;
    }

    public void setRegistrohoraextraPK(RegistrohoraextraPK registrohoraextraPK) {
        this.registrohoraextraPK = registrohoraextraPK;
    }

    public String getAticomplementar() {
        return aticomplementar;
    }

    public void setAticomplementar(String aticomplementar) {
        String oldAticomplementar = this.aticomplementar;
        this.aticomplementar = aticomplementar;
        changeSupport.firePropertyChange("aticomplementar", oldAticomplementar, aticomplementar);
    }

    public Double getQuantidadehoras() {
        return quantidadehoras;
    }

    public void setQuantidadehoras(Double quantidadehoras) {
        Double oldQuantidadehoras = this.quantidadehoras;
        this.quantidadehoras = quantidadehoras;
        changeSupport.firePropertyChange("quantidadehoras", oldQuantidadehoras, quantidadehoras);
    }

    public Double getBhmes() {
        return bhmes;
    }

    public void setBhmes(Double bhmes) {
        Double oldBhmes = this.bhmes;
        this.bhmes = bhmes;
        changeSupport.firePropertyChange("bhmes", oldBhmes, bhmes);
    }

    public Double getOutros() {
        return outros;
    }

    public void setOutros(Double outros) {
        Double oldOutros = this.outros;
        this.outros = outros;
        changeSupport.firePropertyChange("outros", oldOutros, outros);
    }

    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        Double oldTotal = this.total;
        this.total = total;
        changeSupport.firePropertyChange("total", oldTotal, total);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (registrohoraextraPK != null ? registrohoraextraPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Registrohoraextra)) {
            return false;
        }
        Registrohoraextra other = (Registrohoraextra) object;
        if ((this.registrohoraextraPK == null && other.registrohoraextraPK != null) || (this.registrohoraextraPK != null && !this.registrohoraextraPK.equals(other.registrohoraextraPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.evl.tecinfo.gui.Registrohoraextra[ registrohoraextraPK=" + registrohoraextraPK + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
